public class ExceptionTest {
    public static void main(String[] args) {
//        try {
//            int result = divide(4, 0);
//            System.out.println(result);
//        } catch (Exception e) {
//            System.out.println("捕获的异常是");
//            e.printStackTrace(System.out);
//        } finally {
//            System.out.println("执行finally代码块");
//        }

        divide(4, 2);
        System.out.println("程序继续向下执行");
    }

    public static int divide(int x, int y) throws RuntimeException{
        int result = x / y;
        return result;
    }
}
